package svc

import (
	"core/api/internal/config"
	"core/corerpc/corerpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	CoreRpc corerpcclient.Corerpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		CoreRpc: corerpcclient.NewCorerpc(zrpc.MustNewClient(c.CoreRpc)),
	}
}
